import request from '@/utils/request'

// 查询入住记录列表
export function listHouseRecord(query) {
  return request({
    url: '/hotel/houseRecord/list',
    method: 'get',
    params: query
  })
}


// 查询房间列表
export function houseAllList(query) {
  return request({
    url: '/hotel/houseRecord/allList',
    method: 'get',
    params: query
  })
}

// 切换房间状态
export function changeHouseStatus(data) {
  return request({
    url: '/hotel/houseRecord/changeHouseStatus',
    method: 'post',
    data: data
  })
}

// 入住详细
export function getHouseDetail(houseId) {
  return request({
    url: '/hotel/houseRecord/checkInDetail/' + houseId,
    method: 'get'
  })
}

// 入住登记
export function addHouseRecord(data) {
  return request({
    url: '/hotel/houseRecord/checkInRegister',
    method: 'post',
    data: data
  })
}

// 确认退房
export function confirmCheckOut(houseId) {
  return request({
    url: '/hotel/houseRecord/confirmCheckOut/' + houseId,
    method: 'get'
  })
}

// 查看所有房间状态数量
export function getHouseStatusNumber() {
  return request({
    url: '/hotel/houseRecord/getHouseStatusNumber',
    method: 'get'
  })
}

export function updateHouseRecord(data) {
  return request({
    url: '/hotel/houseRecord/addCheckInPeople',
    method: 'post',
    data: data
  })
}

export function deleteCheckInPeople(data) {
  return request({
    url: '/hotel/houseRecord/deleteCheckInPeople',
    method: 'post',
    data: data
  })
}